
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Square.h>


USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Square)
{
	TEST(should be able to calc the perimeter of a Square:perimeter=8 when side=2)
	{	Square squ(2);
		ASSERT_EQ(8, squ.getPerimeter());
	}

	TEST(should be able to calc the area of a Square:area=4 when side=2)
	{
		Square squ(2);
		ASSERT_EQ(4, squ.getArea());
	}

	TEST(should be able to calc the perimeter correctly when change side)
	{	Square squ(2);
                squ.setSide(3);
		ASSERT_EQ(12, squ.getPerimeter());
	}

	TEST(should be able to calc the area correctly when change side)
	{
		Square squ(2);
                squ.setSide(3);
		ASSERT_EQ(9, squ.getArea());
	}
};
